package org.wzh.spring.di.demob;

import org.springframework.beans.factory.annotation.Autowired;
import org.wzh.spring.di.demo1.CompactDisc;
import org.wzh.spring.di.demo4.MediaPlayer;

public class CDPlayer implements MediaPlayer {

	private CompactDisc compactDisc;

	/**
	 * @param compactDisc
	 *            the compactDisc to set
	 */
	@Autowired
	public void setCompactDisc(CompactDisc compactDisc) {
		this.compactDisc = compactDisc;
	}

	@Override
	public void play() {
		compactDisc.play();
	}

}
